import React, { useEffect, useState } from 'react'
import styles from './index.less'
import NewSwiper from './NewSwiper'
import collectIcon from '../../assets/icon/collectIcon.png'
import { useDispatch, useSelector } from 'dva'

function Index() {
  const dispatch = useDispatch()
  const {
    videoList
  } = useSelector(({ index }) => index)
  useEffect(() => {
    dispatch({
      type: 'index/apiGetVideoList',
      payload:{
        pageSize:200,
        page:1
      }
    })
  }, [])
  return (
    <div className={styles.page}>
      <div style={{ textAlign: 'center' }}>
        <NewSwiper data={videoList} />
        {/* <img src={collectIcon} className={styles.collectIcon}></img> */}
      </div>
    </div>
  )
}

export default Index
